import java.util.Arrays;
import java.util.Scanner;

public class day3 {
    /**
     * 排序 或 模拟
     * JZ61 扑克牌顺子
     * https://www.nowcoder.com/practice/762836f4d43d43ca9deb273b3de8e1f4?tpId=13&tqId=11198&ru=/exam/oj
     */
    public boolean IsContinuous1 (int[] numbers) {
        // 排序
        Arrays.sort(numbers);
        int n = numbers.length;
        int count = 0;
        int gap = 0;
        for (int i = 0; i < n - 1; i++) {
            if (numbers[i] == 0) {
                count++;
            } else {
                if(numbers[i + 1] - numbers[i] == 0) {
                    return false;
                }else {
                    gap += numbers[i + 1] - numbers[i] - 1;
                }
            }
        }
        if(gap > count) {
            return false;
        }else {
            return true;
        }
    }
    public boolean IsContinuous (int[] numbers) {
        // 模拟
        boolean[] visit = new boolean[14];

        int max = 0,min = 14;
        for(int num : numbers) {
            if(num != 0) {
                if(visit[num]) {
                    return false;
                }
                visit[num] = true;
                max = Math.max(max,num);
                min = Math.min(min,num);
            }
        }
        return max - min <= 4;
    }


    /**
     * 动态规划
     * DP2 跳台阶
     * https://www.nowcoder.com/practice/bfb2a2b3cdbd4bd6bba0d4dca69aa3f0?tpId=230&tqId=39749&ru=/exam/oj
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        // 滚动数组进行优化
        if(n < 2) {
            System.out.print(n);
            return;
        }
        int a = 1,b = 1,c = 0;
        for(int i = 2;i <= n;i++) {
            c = a + b;
            a = b;
            b = c;
        }
        System.out.print(c);
    }

    /**
     * 模拟 枚举
     * BC146 添加逗号
     * https://www.nowcoder.com/practice/f51c317e745649c0900996fd3f683aed?tpId=290&tqId=39934&ru=/exam/oj
     */
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int n = s.length();
        // 从前往后遇到可以%3的就放 ","
        for(int i = 0;i < n;i++) {
            System.out.print(s.charAt(i));
            if((n - 1 - i) % 3 == 0 && i != n - 1) {
                System.out.print(",");
            }
        }
    }

}
